// 字典管理模块
import request from "@/utlis/request";

enum API {
  DICTFINDPAGE_URL = "/dict/findPage", //查询列表
  DICTSAVE_URL = "/dict/save", //新增或者编辑
  DICTDELETE_URL = "/dict/delete", //删除
  DICTFINDBYLABLE_URL = "/dict/findByLable", //根据label查询对象
}

export const reqFindPage = async (data: any) => {
  return request.post<any, any>(API.DICTFINDPAGE_URL, data);
};

export const reqSave = async (data: any) => {
  return request.post<any, any>(API.DICTSAVE_URL, data);
};

export const reqDelete = async (data: any) => {
  return request.post<any, any>(API.DICTDELETE_URL, data);
};

export const reqFindbyLable = async (lable: string) => {
  return request.get<any, any>(API.DICTFINDBYLABLE_URL + "?lable=" + lable);
};
